layui.define([ 'form', 'laydate', 'table' ], function(exports) {
	var form = layui.form;
	var index = layui.index;
	var loginForm = $("#indexLoginForm");
	var view = {
		init : function() {
			this.initSubmit();
		},
		initSubmit : function() {
			/*$(document).on("submit","#indexLoginForm",function() {
				var self = this;
				Lib.submitForm("/user/login.json",$(this),{},function(data) {
					$(self).closest(".index-login").load("/ajax/loginStatus.do");
				})
				return false;
			})*/
		}
	}
	exports('index', view);
});

$(document).on("click", "#logoutBtn" ,function() {
	var self = this;
	Common.post("/user/logout.json", {}, function() {
		$(self).closest(".index-login").load("/ajax/loginStatus.do",function() {
			layui.use(['index'], function(){
			    var index = layui.index;
			    index.init();
			});
		});
	});
})